<!DOCTYPE html>
<html>
  <head>
    <title>JSMpeg Stream Client</title>
    <style type="text/css">
      html,
      body {
        background-color: #111;
        text-align: center;
      }
    </style>
  </head>
  <body>
    <canvas id="video-canvas"></canvas>
    <button id="start">play</button>
    <script type="text/javascript" src="jsmpeg.js"></script>
    <script type="text/javascript">
      const start = document.getElementById('start');
      start.onclick = () => {
        const canvas = document.getElementById('video-canvas');
        const url = 'ws://localhost:9999/pull/test';
        var player = new JSMpeg.Player(url, {
          canvas: canvas,
          audio: false,
          pauseWhenHidden: false,
          videoBufferSize: 8 * 1024 * 1024,
        });
      };
    </script>
  </body>
</html>
